package com.chaosj.memory.command;

import com.chaosj.webmagic.DefaultLocalFileService;
import org.springframework.shell.standard.ShellCommandGroup;
import org.springframework.shell.standard.ShellComponent;
import org.springframework.shell.standard.ShellMethod;
import org.springframework.shell.standard.ShellOption;

/**
 * @className: WordCommand
 * @description:
 * @author: caoyangjie
 * @date: 2022/3/22
 **/
@ShellComponent
@ShellCommandGroup("rd")
public class WordCommand extends AbstractCommand{

    @ShellMethod("rdc")
    public String rdc(
                      @ShellOption(help = "词组名：\n\t\t动物\n\t\t亲戚\n\t\t名人") String value,
                      @ShellOption(help = "获取多少个") String size){
        String[] args = new String[]{"rd", "c", value, size};
        return defaultInvoke(args);
    }

    @ShellMethod("rde")
    public String rde(@ShellOption(help = "词组名：\n\t\tc2e(中英互译)\n\t\tgre(GRE词典)\n\t\ttf(托福)\n\t\te2c(简单单词)") String value,
                       @ShellOption(help = "获取多少个") String size){
        String[] args = new String[]{"rd", "e", value, size};
        return defaultInvoke(args);
    }


    @ShellMethod("rdx")
    public String rdx(@ShellOption(help = "词组名：\n\t\tl(成语)\n\t\tp(名胜古迹)\n\t\t(歇后语)\n\t\ty(名句)\n\t\tz(地名)") String value,
                       @ShellOption(help = "获取多少个") String size){
        String[] args = new String[]{"rd", "x", value, size};
        return defaultInvoke(args);
    }
}
